The present invention relates to method and apparatus for use of digital communications signals, and more particularly, to method and apparatus for audible fast-forward or reverse of compressed audio content.
Providing an audible fast-forward/reverse support for compressed audio formats is typically a challenge due to resynchronization issues associated with such formats. FIGS. 6 and 7 show the formats of a typical compressed audio data stream. The data stream is divided into units called frames. Each frame represents a segment of audio data which can be decoded. At the start of each frame is a header, which contains general information about the data stream, i.e., sampling rate, bit rate, profile, etc. The first word of the header is a syncword, which is a string of bits that identifies the xe2x80x9cstartxe2x80x9d of a frame.
For current generation personal, digital audio players, the fast-forward and reverse functions are silent. That is, the user only hears silence during the fast-forward (or reverse) operation. A simple fast-forward technique involves jumping forward in the data stream by an amount associated with the desired fast-forward rate, and then re-synchronizing based on the frame headers. To do this resynchronization, a search may be employed which searches the data stream for the string of bits which matches a syncword. When this syncword is found, the decoder can begin parsing the frame. In addition, a cyclic redundancy check (CRC) can be used to detect errors in the data stream.
However, even this simple technique has many practical problems associated with it. Many compressed audio file formats, such as MPEG-1 Layer 3 (MP3) or MPEG-2 AAC, utilize large amounts of variable length coding. Certain allowable sequences of these variable length codes can actually emulate the syncword, i.e., the syncword is not unique. It is a common occurrence to find a match to a xe2x80x9cfalsexe2x80x9d syncword when searching in such a data stream.
In addition, the CRC check is typically not required, and is therefore not always transmitted. When it is transmitted, significant parsing and/or computation may be required to determine the validity of the frame. In some audio transports, a 1-bit field is used to indicate whether the CRC is used. Parsing a faulty header which has this bit set to 0 (caused by faulty syncword detection) may, in fact, cause the CRC check to be disabled.
Because of the use of variable-length codes, parsing errors can occur (and be decoded/played) undetected, since even random noise can sometimes be a valid sequence of codewords. This results in the output of the decoder being badly distorted.
Furthermore, in some audio data streams, such as those associated with MP3, the data required to decode the frame actually occurs before the syncword and header. A field in the header tells the decoder where to look for data. This pointer will always point backwards, and in some cases will even point to a location before the previous frame hear. When a break or discontinuity in the data stream occurs, resynchronization is difficult because, even though the header has been found, the data may not be complete.
Synchronization of hierarchical or multiplexed data streams poses an additional problem. In such data streams, an outer bitstream which may be encrypted carries pieces of an inner data stream as payload. This multiplexed data stream may be decoded by an outer decoder that extracts the payload data and supplies it to an inner decoder. Following a splice in the data stream, the outer decoder/decryptor must first gain synchronization, followed by the inner decoder. This compounds the difficulty of problems such as resynchronization time and error robustness.
The present invention provides a method and apparatus for audible fast-forward or reverse of compressed audio content.
The present invention provides a method for performing audible fast-forward/reverse of audio content represented in a compressed format, such as, but not limited to, MPEG-1 Layer 3 (MP3) or MPEG-2 Advance Audio Coding (AAC). A fast-forward controller is employed which performs fast-forward or reverse by repeatedly skipping forward or reverse in a stored compressed audio data stream, retrieves a chunk of data, and then stores these data chunks in an end-to-end fashion, such that they are spliced back together as a single data stream. A decoder is then used to decode each of these chunks, to detect when a chunk switch has occurred (a splice in the data stream), and to quickly resynchronize at each transition. Hierarchical or multiplexed data streams may be decrypted and decoded using a cascade of decoders each employing this technique. The decoder uses a novel and robust syncword search for performing resynchronization and error recovery.